pub fn new_birthday_probability(n: u32) -> f64 {
    if n > 365 {
        return 1.0; // 当人数超过365人时，必然有两人或以上生日相同
    }

    let days_in_year = 365;
    let mut probability_of_unique_birthdays = 1.0;
    for i in 0..n {
        probability_of_unique_birthdays *= (days_in_year as f64 - i as f64) / days_in_year as f64;
    }

    // 至少有两人生日相同的概率等于1减去所有人都生日不同的概率
    1.0 - probability_of_unique_birthdays
}